﻿using System.Collections.Generic;
using System.Net;
using System.IO;
using System.Runtime.Serialization.Formatters.Binary;

namespace UniTax.Models
{
    public class Converter
    {
        public static byte[] ToArrayOfByte(object Object)
        {
            var memStream = new MemoryStream();
            var binF = new BinaryFormatter();
            binF.Serialize(memStream, Object);
            var buffer = memStream.GetBuffer();
            memStream.Close();
            return buffer;
        }
    }
}
